After creating a new extension, we try to open the main source
file with the default handler, which fails when there is none.
But given that the extension was created successfully, don't treat
a missing handler as failure, and print the path to the new extension
instead.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/905
GList l;
main_source = g_file_get_child (dir, "extension.js");
- handler = g_file_query_default_handler (main_source, NULL, error);
+ handler = g_file_query_default_handler (main_source, NULL, NULL);
if (handler == NULL)
- return FALSE;
+ {
+ /* Translators: a file path to an extension directory */
+ g_print (_("The new extension was successfully created in %s.\n"),
+ g_file_peek_path (dir));
+ return TRUE;
+ }
l.data = main_source;
l.next = l.prev = NULL;